package com.xkdx.guangguang.fragment.home;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

import com.xkdx.guangguang.module.network.AbsAction;
import com.xkdx.guangguang.module.network.AbsAction.Parameter;
import com.xkdx.guangguang.module.statics.IConstants;

public class HomeAction extends AbsAction {

	public HomeAction() {
	}

	@Override
	public void constructRequest() {
		HashMap<String, String> map = new HashMap<String, String>();
		map.put("DeviceID", "2");
		map.put("UpdateTime", "1900-1-1");
		String homeJson = constructJson(map);
		Parameter parameter = new Parameter("informationInterface",
				"getUpdateHomeInfoList", homeJson);

		HashMap<String, String> nearbymap = new HashMap<String, String>();
		nearbymap.put("DeviceID", "2");
		nearbymap.put("InfoType", "1|2");
		nearbymap.put("PageIndex", "1");
		nearbymap.put("Latitude", String.valueOf(IConstants.lat));
		nearbymap.put("Longitude", String.valueOf(IConstants.lon));
		nearbymap.put("Distance", "500");
		nearbymap.put("PageSize", "100");
		nearbymap.put("Version", "1");
		nearbymap.put("RefreshTime", "2023-1-1");

		String nearByJson = constructJson(nearbymap);

		Parameter parameter2 = new Parameter("informationInterface",
				"getNearbyInfoList", nearByJson);
		Parameter parameter3 = new Parameter("systemInterface", "getCityList",
				"\"\"");

		List<Parameter> list = new ArrayList<Parameter>();
		list.add(parameter);
		list.add(parameter2);
		list.add(parameter3);
		requestData = constructMod(list);
	}

}